<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .father {
            width: 800px;
            height: 1000px;
            border: 1px solid #000;
            display: flex;
        }

        .father .item {
            width: 200px;
            height: 100px;
            border: 2px solid darkgoldenrod;
            background-color: darkcyan;
            margin-right: 10px;
            margin-bottom: 10px;
            font-size: 30px;
            color: #fff;
            /* 定义元素们的排列方式 ，数值越小越往前 */
            order: 5;
            /* 在父元素的width还有剩余分配空间时，定义元素放大比例  默认是0  0是原尺寸大小   1:等分其余空间（将宽度均匀占满）*/
            flex-grow: 1;
        }

        .item:nth-child(2) {
            order: 1;
            /* 定义子元素在主轴上的空间 */
            flex-basis: 300px;
            /* 处理父元素剩余空间不足时，子元素收缩规则  默认是1*/
            flex-shrink: 0;
        }
    </style>
</head>

<body>
<div class="father">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <!-- <div class="item">4</div>
    <div class="item">5</div>
    <div class="item">6</div>
    <div class="item">7</div>
    <div class="item">8</div>
    <div class="item">9</div> -->
</div>
</body>

</html>
